package com.hangxintong.common.feign;

import com.hangxintong.common.base.entity.LmUser;
import com.hangxintong.common.config.FeignConfiguration;
import com.hangxintong.common.feign.feignImpl.MessageNacosFeignImpl;
import com.hangxintong.common.utils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;


@FeignClient(value = "hxt-message",configuration = FeignConfiguration.class,fallback = MessageNacosFeignImpl.class)
@Component
public interface MessageNacosFeign {

    @GetMapping(value = "/assoc/userAssocCompanyControllerg/detail")
    Result hello(Integer userId);
    /**
    * @Description
    * @Author  Bz.Mr
    * @Date   2021/1/26 13:46
    * 发送短信
    */
    @GetMapping(value="/message/aliyun/sendSms/{phone}")
    Result SendSms(@PathVariable(value = "phone") String phone,
                          @RequestParam(value = "forget") Integer forget,
                          @RequestParam(value = "status") Integer status);
    /**
    * @Description
    * @Author  Bz.Mr
    * @Date   2021/1/26 17:03
    *  发邮件
    */
    @PostMapping(value="SendMailCode")
    Result SendMailCode(@RequestParam(value = "email") String email);
    /**
    * @Description
    * @Author  Bz.Mr
    * @Date   2021/1/20 11:06
    *  用户登录添加新会员表【谭世杰】
    */
    @PostMapping("/member/companyNew/saveUserMember")
    Result saveUserMember(@RequestBody LmUser user);
    /**
    * @Description
    * @Author  Bz.Mr
    * @Date   2021/1/14 18:03
    * 已读协会协会缴费信息【米雪飞】
    */
    @PutMapping("/member/dues/log/notes")
    @ApiOperation(value = "修改阅读状态", notes = "修改阅读状态")
    Result editReadStatus(@RequestParam("logId") Long logId,
                          @RequestParam("memberId") Long memberId,
                          @RequestParam("userName") String userName);
}